package handler

import (
	"gluenet/pkg/apis"
)

type JRequest struct {
	Guid  string `json:"guid" yaml:"guid"`
	Topic string `json:"topic" yaml:"topic"`
}

type JResponse struct {
	Code    int         `json:"code" yaml:"code"`
	Message string      `json:"message" yaml:"message"`
	Data    interface{} `json:"data" yaml:"data"`
}

func Traces(c *apis.StorageContext) {
	//c.Logger.Debugf("receive trace")

	if err := c.DataBase.TracesPut(c.RpcContext.Data.Data); err != nil {
		c.Logger.Errorf("insert trace %v", err)
	} else {
		//c.Logger.Debugf("insert trace succeed")
	}
}
